Range
Function
This API is used to set parameter for Custom > Cloud(new) page.
Note:
The Range provides reference information for client UI input limits and API request limits. When sending Get and Set requests, the parameters must be strictly limited according to the Range, otherwise the request may be rejected by the device.
Request Message
None.
Sample:
POST /API/StorageConfig/Server/Range HTTP/1.1
{
"version": "1.0",
"data": {}
}
Response Message
Parameter Description
Table 1
Parameter | Range | Type | Description |
---|---|---|---|
accesstoken | 1-128 | string | Token after Dropbox activation |
Table 2
Parameter | Range | Type | Description |
---|---|---|---|
enc_mode | FTP SFTP AWS S3 DROPBOX Google Drive | string | Server mode (DVR/NVR dedicated) |
video_stream_type | Mainstream Substream | string | Video stream type (dedicated to DVR/NVR) |
video_type | MP4 RF | string | Video file type (DVR/NVR specific) |
max_package_interval | 10 30 60 180 300 600 | Int | Maximum subcontracting interval Second (DVR/NVR exclusive) |
cloud_status | Activated CloudFull Unactivated NetworkBlocked Disabled | string | Cloud storage connection status (DVR/NVR only) Note: only access is allowed, and setting is not supported |
total_size | Unit: Bytes | unsigned long long | Total capacity (DVR/NVR dedicated) Note: Only allowed for acquisition, not supported for setting |
used_size | Unit: Bytes | unsigned long long | Used capacity (DVR/NVR dedicated) Note: Only allowed to obtain, not supported for setting |
cloud_over_write | Off Auto 1Day 3Days 7Days 14Days 30Days 90Days | string | Cloud storage data overwrite time (DVR/NVR dedicated) |
progress | [0~100] | int | Capacity usage percentage of Cloud storage (DVR/NVR only) Note: only access is allowed, and setting is not supported |
enc_agreement | "ftp://" "sftp://" "https://" | string | Protocol before IP Total capacity (DVR/NVR dedicated) Note: Only allowed to obtain, not supported to set |
server_ip | Max length: 255 byte | string | IP address (DVR/NVR dedicated) |
port | [1~65535] | int | Server Port |
username | Max length: 255 byte | string | Login username |
password | Max length: 255 byte | string | Login password |
password_empty | bool | Is the password empty | |
region | [0~31] | string | Region (DVR/NVR exclusive) |
enable | bool | Enabling the server (DVR/NVR dedicated) | |
test | bool | Does it support TEST (DVR/NVR dedicated) | |
activate_cloud_btn | bool | Does it support activation button (dedicated to DVR/NVR) | |
show_server_content | enable test port password password_empty video_stream_type server_ip video_type max_package_interval enc_agreement region activate_cloud_btn cloud_status total_size used_size progress cloud_over_write | string | Tell the remote corresponding mode which controls should be displayed |
Table 3
Parameter | Range | Type | Description |
---|---|---|---|
cloud_type | DROPBOX Google Drive | string | Cloud storage type |
Table 4
Parameter | Range | Type | Description |
---|---|---|---|
url | string | Request Connection URL | |
code | string | Verification code (for Google Drive Cloud storage) |
Tips:
The response message of the Range request may not contain all the fields in the above table, and the fields not included indicate that the device does not support this parameter configuration.
Sample:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": "success",
"data": {
"enc_mode": {
"type": "string",
"items": [
"FTP",
"SFTP",
"AWS S3",
"DROPBOX",
"Google Drive",
"AI Cloud"
]
},
"enc_agreement": {
"type": "string",
"items": [
"ftp: //",
"sftp: //",
"https: //"
]
},
"video_stream_type": {
"type": "string",
"items": [
"Substream"
]
},
"video_type": {
"type": "string",
"items": [
"MP4",
"RF",
"H.264/H.265/MJPEG"
]
},
"max_package_interval": {
"type": "int32",
"unit": "second",
"items": [
10,
30,
60,
180,
300,
600
]
},
"cloud_status": {
"type": "string",
"items": [
"Activated",
"CloudFull",
"Unactivated",
"NetworkBlocked",
"Disabled"
]
},
"total_size": {
"type": "string",
"min_len": 0,
"max_len": 20
},
"used_size": {
"type": "string",
"min_len": 0,
"max_len": 20
},
"progress": {
"type": "int32",
"min": 0,
"max": 100
},
"cloud_over_write": {
"type": "string",
"items": [
"OFF",
"Auto",
"1Day",
"3Days",
"7Days",
"14Days",
"30Days",
"90Days"
]
},
"mutual_exclusion_rule": {
"type": "string",
"items": [
"cloud",
"all"
]
},
"ftp_info": {
"type": "object",
"items": {
"enable": {
"type": "bool"
},
"server_ip": {
"description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
"type": "string",
"mode": "rw",
"ranges": [
{
"min_len": 0,
"max_len": 255
},
{
"min_len": 1,
"max_len": 255
}
]
},
"port": {
"type": "int32",
"mode": "r",
"min": 1,
"max": 65535,
"default_value": 21
},
"username": {
"description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
"type": "string",
"mode": "rw",
"ranges": [
{
"min_len": 0,
"max_len": 63
},
{
"min_len": 1,
"max_len": 63
}
]
},
"password": {
"description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
"type": "string",
"mode": "rw",
"ranges": [
{
"min_len": 0,
"max_len": 63
},
{
"min_len": 1,
"max_len": 63
}
]
},
"password_empty": {
"type": "bool"
},
"show_server_content": {
"type": "string",
"items": [
"enable",
"test",
"port",
"password",
"password_empty",
"video_stream_type",
"server_ip",
"video_type",
"max_package_interval",
"enc_agreement"
]
}
}
},
"sftp_info": {
"type": "object",
"items": {
"enable": {
"type": "bool"
},
"server_ip": {
"description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
"type": "string",
"mode": "rw",
"ranges": [
{
"min_len": 0,
"max_len": 255
},
{
"min_len": 1,
"max_len": 255
}
]
},
"port": {
"type": "int32",
"mode": "r",
"min": 1,
"max": 65535,
"default_value": 22
},
"username": {
"description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
"type": "string",
"mode": "rw",
"ranges": [
{
"min_len": 0,
"max_len": 63
},
{
"min_len": 1,
"max_len": 63
}
]
},
"password": {
"description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
"type": "string",
"mode": "rw",
"ranges": [
{
"min_len": 0,
"max_len": 63
},
{
"min_len": 1,
"max_len": 63
}
]
},
"password_empty": {
"type": "bool"
},
"show_server_content": {
"type": "string",
"items": [
"enable",
"test",
"port",
"password",
"password_empty",
"video_stream_type",
"server_ip",
"video_type",
"max_package_interval",
"enc_agreement"
]
}
}
},
"aws_info": {
"type": "object",
"items": {
"enable": {
"type": "bool"
},
"server_ip": {
"description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
"type": "string",
"mode": "rw",
"ranges": [
{
"min_len": 0,
"max_len": 255
},
{
"min_len": 1,
"max_len": 255
}
]
},
"region": {
"type": "string",
"items": [
"us-east-2/",
"us-east-1/",
"us-west-1/",
"us-west-2/",
"af-south-1/",
"ap-east-1/",
"ap-southeast-3/",
"ap-south-1/",
"ap-northeast-3/",
"ap-northeast-2/",
"ap-southeast-1/",
"ap-southeast-2/",
"ap-northeast-1/",
"ca-central-1/",
"eu-central-1/",
"eu-west-1/",
"eu-west-2/",
"eu-south-1/",
"eu-west-3/",
"eu-north-1/",
"me-south-1/",
"me-central-1/",
"sa-east-1/"
]
},
"storage_class": {
"type": "string",
"items": [
"STANDARD",
"STANDARD_IA",
"ONEZONE_IA",
"INTELLIGENT_TIERING",
"GLACIER",
"DEEP_ARCHIVE",
"REDUCED_REDUNDANCY"
]
},
"username": {
"description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
"type": "string",
"mode": "rw",
"ranges": [
{
"min_len": 0,
"max_len": 63
},
{
"min_len": 1,
"max_len": 63
}
]
},
"password": {
"description": "Each range {min_len,max_len} corresponds to one ftp_enable state [false,true].",
"type": "string",
"mode": "rw",
"ranges": [
{
"min_len": 0,
"max_len": 63
},
{
"min_len": 1,
"max_len": 63
}
]
},
"password_empty": {
"type": "bool"
},
"show_server_content": {
"type": "string",
"items": [
"enable",
"test",
"region",
"password",
"password_empty",
"video_stream_type",
"server_ip",
"video_type",
"max_package_interval",
"enc_agreement"
]
}
}
},
"dropbox_info": {
"type": "object",
"items": {
"enable": {
"type": "bool"
},
"show_server_content": {
"type": "string",
"items": [
"enable",
"activate_cloud_btn",
"video_stream_type",
"video_type",
"max_package_interval",
"cloud_status",
"total_size",
"used_size",
"progress",
"cloud_over_write"
]
}
}
},
"google_drive_info": {
"type": "object",
"items": {
"enable": {
"type": "bool"
},
"show_server_content": {
"type": "string",
"items": [
"enable",
"activate_cloud_btn",
"video_stream_type",
"video_type",
"max_package_interval",
"cloud_status",
"total_size",
"used_size",
"progress",
"cloud_over_write"
]
}
}
},
"AICloud_info": {
"type": "object",
"items": {
"enable": {
"type": "bool"
},
"show_server_content": {
"type": "string",
"items": [
"enable",
"video_stream_type",
"video_type",
"max_package_interval"
]
}
}
}
}
}
Error Code
See Response Messages Body and Common error_code for more information.